(function () {
    //3实例化
    let myChart = echarts.init(document.querySelector(".box-left1"));
    let option = {
        title: {
            text: '分类',  
            top: 20,
      textStyle: {
        color: "#faff72",
      },
           
          },
        legend: {
            top: 'bottom'
          },
          toolbox: {
            show: true,
            feature: {
              mark: { show: true },
              dataView: { show: true, readOnly: false },
              restore: { show: true },
              saveAsImage: { show: true }
            }
          },
          series: [
            {
              name: '星座分类',
              top:".2rem",
              type: 'pie',
              radius: [50, 100],
              center: ['50%', '50%'],
              roseType: 'area',
              itemStyle: {
                borderRadius: 8
              },
              data: [
                  
                { value: 40, name: '风象' },
                { value: 38, name: '水象' },
                { value: 32, name: '土象' },
                { value: 32, name: '火象' },
               
              ]
            }
          ]
    };
    myChart.setOption(option);
    //自适应
    window.addEventListener('resize',()=>{
      myChart.resize()
  
    })
  
  })();
  